@extends('style.app')
@section('ant-content')
    <div class="callout large">
        <!-- Start Notification-->
        <div class="callout success" data-closable>
            <button class="close-button" aria-label="Close alert" type="button" data-close>
                <span aria-hidden="true">&times;</span>
            </button>
            <p class="text-center">Leia os Termos antes de pesquisar ou enviar um endereço.</p>
        </div>
        @if(isset($result) and $result==1)
            <div data-alert class="alert-box success radius">
                Enviado com sucesso!
                <a href="#" class="close">&times;</a>
            </div>
        @endif
        @if($errors->any())
            <div data-alert class="alert-box success radius">
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
                <a href="#" class="close">&times;</a>
            </div>
        @endif
    <!--End Notification-->
        <div class="text-center">
            {!! Form::open(['route'=>'catalogo.search','id'=>'search']) !!}
            <div class="input-group">
                <input class="input-group-field" type="text" name="string" placeholder="nome">
                <div class="input-group-button">
                    <input type="submit" class="button hollow" value="Buscar">
                    <button class="button" data-open="model99" type="button">Inserir</button>
                </div>
            </div>
            {!! Form::close() !!}
            <span class="subheader">Os dados pesquisados são os metadados enviados pelos próprios usuários. @lang('ui.nojavascript')</span>
        </div>
        @if(isset($catalogos))
            <hr>
            <ul>
                @foreach($catalogos as $catalogo)
                    <li><a href="http://{{i2pHelperAddress($catalogo->name,$catalogo->b64)}}">{{$catalogo->name}}</a>
                    </li>
                @endforeach
            </ul>
        @endif
    </div>
@endsection
@section('content')
    <div class="reveal" id="model99" data-reveal>
        <h1>Insira o dados</h1>
        <!-- <p class="lead">Your couch. It is mine.</p>
         <p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>-->
        {!! Form::open(['route'=>'catalogo.store','id'=>'search']) !!}
        <div class="input-group">
            <label for="name">Nome :</label>
            <div class="input-group-button">
                <input class="input-group-field" type="text" name="name" placeholder="name.i2p">

            </div>
        </div>
        <div class="input-group">
            <label for="category">Categorias :</label>
            <div class="input-group-button">
                <input class="input-group-field" type="text" name="category" placeholder="categoria,categoria">
            </div>
        </div>
        <div class="input-group">
            <label for="address">Endereço :</label>
            <div class="input-group-button">
                <input class="input-group-field" type="text" name="address" placeholder="b64">
            </div>
        </div>
        <input type="submit" class="button hollow" value="Enviar">
        {!! Form::close() !!}
        <button class="close-button" data-close aria-label="Close modal" type="button">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
@endsection

